Consider the perceptron, then the GD update becomes

wt+1=wtηwL|wt=wt+η1ni{misclassified}yixiw^{t+1} = w^t - \eta \nabla_w L \mid_{w^t} = w^t + \eta \frac{1}{n} \sum_{i \in \{\text{misclassified}\}} y_i x_i

and SGD update is based on a single misclassified data point,

wt+1=wt+yixiw^{t+1} = w^t + y_i x_i

The SGD update gives rise to an online perceptron algorithm:


References

  1. Anna Choromanska. ECE-GY 7143 course slides, lecture 2.